{{#index}}
<div class="main-content">
    <div class="div-title">角色列表</div>
    <div class="search-div">
        <div class="search-content">

            <div class="search">
                <label class="">角色名</label>
                <input type="text" class="search-input search-param" name="name"/>
            </div>

        </div>

        <div class="action-div">
            <button class="btn btn-sm btn-primary e-go sysRole_add" href="module/sysRole/add">新增</button>
            <button class="btn btn-sm btn-primary e-table-search">搜索</button>
        </div>
    </div>
    <div class="table-action-div">
        <button class="btn btn-sm btn-primary e-table-batch-delete sysRole_batch_delete" url="sysRole/batchDelete" table-class-name="bootstrapTable">批量删除</button>
        <button class="btn btn-sm btn-primary e-table-export sysRole_export" url="sysRole/export" search-param-class-name="search-param">导出</button>
    </div>
    <table class="bootstrapTable">

    </table>
</div>
{{/index}}


{{#add}}
<div class="main-content">
    <div class="div-title">添加角色</div>
    <form class="data-form">
        <div class="form-horizontal m-t">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-3 control-label">角色名</label>
                    <div class="col-sm-7">
                        <input name="name" type="text" class="form-control data-param" required="required">
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12 center-action-div">
                <button class="btn btn-primary e-submit" type="button">提交</button>
                <button class="btn btn-primary e-go-index" type="button">返回</button>
            </div>
        </div>
    </form>
</div>
{{/add}}


{{#info}}
<div class="main-content">
    <div class="div-title">角色详情</div>
    <div class="form-horizontal m-t">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">角色名</label>
                <div class="col-sm-7">
                    <input type="text" class="form-control" readonly="readonly" value="${data.sysRole.name}">
                </div>
            </div>
        </div>


        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">创建时间</label>
                <div class="col-sm-7">
                    <input type="text" class="form-control" readonly="readonly" value="${data.sysRole.createDate}">
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12 center-action-div">
            <button class="btn btn-primary e-go-index" type="button">返回</button>
        </div>
    </div>
</div>
{{/info}}


{{#update}}
<div class="main-content">
    <div class="div-title">修改角色</div>
    <form class="data-form">
        <div class="form-horizontal m-t">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-3 control-label">角色名</label>
                    <div class="col-sm-7">
                        <input type="text" name="name" class="form-control data-param" value="${data.sysRole.name}" required="required">
                    </div>
                </div>
            </div>

        </div>


        <div class="row">
            <div class="col-sm-12 center-action-div">
                <button class="btn btn-primary e-update" type="button">修改</button>
                <button class="btn btn-primary e-go-index" type="button">返回</button>
            </div>
        </div>
    </form>
</div>
{{/update}}


{{#setSysPermission}}
<div class="main-content">
    <div class="div-title">配置权限</div>
    <div class="dd nestable-show">
        <js>var forOut=function(treeData,level)</js>
        <js-code>
            <js>if(treeData==null||treeData.length==0)</js>
            <js-code>
                <js>return;</js>
            </js-code>
            <ol class="dd-list">
                <js>var currentLevel=level</js>
                <js>for(var i=0;i< treeData.length;i++)
                </js>
                <js-code>
                    <li class="dd-item e-stop-mousedown nes-level-${currentLevel} nes-init" data-id="${treeData[i].id}">
                        <div class="dd-handle">
                            <div class="nestable-btn-div">
                                <input type="checkbox" data-id="${treeData[i].id}" class="e-check e-stop-mousedown"/>
                            </div>
                            ${treeData[i].name}
                        </div>
                        <js>
                            var level1=level+1;
                            forOut($(treeData[i].children),level1)
                        </js>
                    </li>
                </js-code>
            </ol>
        </js-code>
        <js>forOut(data.sysPermissionTree,0);</js>
    </div>

    <div class="row">
        <div class="col-sm-12 center-action-div">
            <button class="btn btn-primary e-go-index" type="button">返回</button>
        </div>
    </div>
</div>
{{/setSysPermission}}
